﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CanDoo.Core;
using CanDoo.Data;
using CanDoo.Contracts;
using CanDoo.Oil.Core.DTOs;
using CanDoo.Oil.Core.Models;
using CanDoo.Core.Data;

namespace CanDoo.Oil.Core.Contracts
{
    /// <summary>
    /// 业务契约——库存
    /// </summary>
    public interface IStockContract : IServiceBaseCore<Stock>, IServiceBase<Stock>
    {
        /// <summary>
        /// 审核通过时更新库存
        /// </summary>
        /// <param name="warehouse"></param>
        /// <param name="productItemList"></param>
        /// <param name="CalculateCost"></param>
        /// <returns></returns>
        OperationResult InToStore(Warehouse warehouse, List<ProductItem> productItemList, bool CalculateCost);

        /// <summary>
        /// 撤销审核时更新库存
        /// </summary>
        /// <param name="warehouse"></param>
        /// <param name="productItemList"></param>
        /// <param name="CalculateCost"></param>
        /// <returns></returns>
        OperationResult OutFromStore(Warehouse warehouse, List<ProductItem> productItemList, bool CalculateCost);
    }
}

